
/* global getCookie visitUrl*/
var userInfo = {};
$(function () {
    $.get('/antique/api/sysUser/query_my_info', { token:getCookie('token') }, function (result) {
        if (result.code == 0) {
            var data = result.data;
            userInfo = data;
            if (!data.shopDetail || !data.shopDetail.id){
                $(".op .item").attr("href","javascript:void(0);"); 
            } 
        }
    });

});

 $(".op .item").click(function () {
    if (userInfo && userInfo.shopDetail && userInfo.shopDetail.id) {
        //有店铺
    } else {
        //没有店铺
        visitUrl('/shop/add',true);
    }
 });